const app = getApp();
Component({
  options: {
    styleIsolation: "apply-shared",
  },
  properties: {},

  data: {
    isPlaying: false,
  },
  pageLifetimes: {
    show() {
      this.setData({
        isPlaying: app.globalData.isPlaying,
      });
    },
  },
  methods: {
    //切换播放状态(暂停、播放)
    togglePlayStatus() {
      const { isPlaying } = this.data;
      this.setData({
        isPlaying: !isPlaying,
      });
      app.globalData.isPlaying = !isPlaying;
    },
  },
});
